import ajax from './ajax'

// 暴露对应的接口
// export const reqHomeData = () => ajax.get("/home");

// xyp
// 获取所有项目数据
export const reqGetAllProject = () =>ajax.get('/allProject')
// 增
export const reqAddProject = (form) =>ajax.post('/addProject',form)
// 根据—id删除
export const reqDeleteProject = (_id) =>ajax.post('/deleteProject',_id)
// 根据—id修改
export const reqUpdateProject = (_id) =>ajax.post('/updateProject',_id)
// 查
export const reqSearchProject = (requestObj) =>ajax.post('/searchProject',requestObj)


// ww
//获取所有预约用户的信息
export const reqReservationInfo = () => ajax.get('/getReservationInfo')
//搜索用户信息
export const findReservation = ({indate,name,usestate}) => ajax.get("/findReservation",{params:{indate,name,usestate}})
//添加用户信息
export const createReservation = (data) => ajax.post("/createReservation",data)
//修改用户信息
export const updateReservation = (data) => ajax.post("/updateReservation",data)
//删除用户信息
export const deleteReservation = (data) => ajax.post('/deleteReservation',data)


// wyb
//暴露删除的接口
export const getDeleteAccount = (account) => ajax.get(`/deleteAccount?account=${account}`)
// 获取后台信息
export const getInfo = () => ajax.get("http://localhost:4100/accountAll")
// 搜索后台信息
export const findInfo = (value) => ajax.post("/findaccount",value)
// 删除信息的回调


// WYL
export const reqTaocanList = () => ajax.get('http://localhost:4200/accountAll')
// 添加信息
export const reqDialogFormVisible = (val) => ajax.post('http://localhost:4200/register', val)
// 删除信息
export const reqDelete = (_id) => ajax.post('http://localhost:4200/deleteAccount', _id)
// 查询
export const reqQuery = (value) => ajax.post('http://localhost:4200/findaccount', value)
// 修改 
export const reqEdit = (value) => ajax.post('http://localhost:4200/Edit', value)